package book.ch10;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

class ArrayNum{
    void func(){}
}

public class E10_5 {
    public static void main(String[] args) throws IOException{
        byte a[]="新年快乐".getBytes();
        byte b[]="Happy New Year".getBytes();
        File file=new File("a.txt");

            OutputStream out=new FileOutputStream(file);
            System.out.println(file.getName()+"的大小："+file.length()+"字节");
            out.write(a);
            out.close();
            out=new FileOutputStream(file,false);
            System.out.println(file.getName()+"的大小："+file.length()+"字节");
            out.write(b);
            System.out.println(file.getName()+"的大小："+file.length()+"字节");
            out.close();
            //char character='&sa';
            String s="sfasdfsafd";

            long a2=10;

            int a1=(int)a2;

            double a3=a2;

            char c1=(char)a1;

            int array[]={1,2,3,4,5,6};
            int[] array2;
            int arrayq[][];

            for(int i=0;i<array.length;i++)
                array[i]=0;



            //byte,short,int,long,float,double


        ArrayNum objectArray[]=new ArrayNum[10];

        for(int i=0;i<objectArray.length;i++){
            objectArray[i]=new ArrayNum();
        }

        objectArray[2].func();


        int a4=10;
        int a5=a4++;
        int a6=++a4;

        int a7;
        a7=+a4;

        ArrayNum arr=new ArrayNum();
        arr=new ArrayNum();

        arr.func();









    }
}
